/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface CusFpApplySel extends BasicModel<CusFpApplySel> {
  sodid?: string; // 订单明细ID
  iqty?: number; // 数量
  iprice?: number; // 含税单价
  isum?: number; // 含税金额
  saleSum?: number; // 折扣额
  applyRds?: any;
}

export const cusFpApplySelList = (params?: CusFpApplySel | any) =>
  defHttp.get<CusFpApplySel>({ url: adminPath + '/shop/order/cusFpApplySel/list', params });

export const cusFpApplySelListData = (params?: CusFpApplySel | any) =>
  defHttp.post<Page<CusFpApplySel>>({
    url: adminPath + '/shop/order/cusFpApplySel/listData',
    params,
  });

export const cusFpApplySelSeledListData = (params?: CusFpApplySel | any) =>
  defHttp.post<Page<CusFpApplySel>>({
    url: adminPath + '/shop/order/cusFpApplySel/selListData',
    params,
  });

export const cusFpApplySelForm = (params?: CusFpApplySel | any) =>
  defHttp.get<CusFpApplySel>({ url: adminPath + '/shop/order/cusFpApplySel/form', params });

export const cusFpApplySelDeleteByUser = (params?: any, data?: CusFpApplySel | any) =>
  defHttp.postJson<CusFpApplySel>({
    url: adminPath + '/shop/order/cusFpApplySel/deleteByUser',
    params,
  });

export const cusFpApplySelSave = (params?: any, data?: CusFpApplySel | any) =>
  defHttp.postJson<CusFpApplySel>({
    url: adminPath + '/shop/order/cusFpApplySel/save',
    params,
    data,
  });

export const cusFpApplySelDelete = (params?: CusFpApplySel | any) =>
  defHttp.get<CusFpApplySel>({ url: adminPath + '/shop/order/cusFpApplySel/delete', params });
